// 创建一个接口
interface Identifiable {
    id: number;
    getName(): string;
}
interface Address{
    addrees:string
}

// 创建类并实现接口
class User implements Identifiable,Address {
    id: number;
    name: string;
    addrees:string;
    constructor(id: number, name: string,addrees:string) {
        this.id = id;
        this.name = name;
        this.addrees=addrees
    }

    getName(): string {
        return this.name;
    }
}

let user = new User(1, "张三", "北京");
console.log(user.name);
console.log(user.addrees);
console.log(user.getName())
